<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <include file="Public:resource"/>
    <title>水费缴纳</title>
</head>
<body>
<div class="container">
    <include file="Public:topWithoutBack" title="水费缴纳"/>
    <empty name="relevanceModel">
        <div class="row" style="margin-top: 50px;">
            <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12" style="font-size: medium;" align="center">
                您尚未绑定任何水费账号
            </div>
        </div>
        <div class="row" style="margin-top: 10px;">
            <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
                <input type="button" class="btn btn-lg btn-block jss-button"
                       onclick="onBind() " value="立即绑定"/>
            </div>
        </div>
        <else/>
        <!--账号-->
        <div class="row" style="margin-top: 20px;">
            <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3 align-to-input medium" align="center">
                水费账号
            </div>
            <div class="col-xs-9 col-sm-89 col-md-9 col-lg-9">
                <select name="userid" id="userid" class="select">
                    <foreach name="relevanceModel" item="relevance">
                        <option value="{$relevance.userid}">{$relevance.userid}</option>
                    </foreach>
                </select>
            </div>
        </div>
        <div class="row" style="margin-top: 20px;">
            <div class="col-xs-12 col-sm-12 col-mg-12 col-md-12">
                <div>
                    <input type="button" class="btn btn-lg btn-block jss-button"
                           onclick="onSearch() " value="查询"/>
                </div>
            </div>
        </div>
    </empty>

    <include file="Public:menu"/>
</div>
<script>
    //绑定
    function onBind() {
        window.location.href = "{:U('Bind/add')}";
    }
    //查询
    function onSearch() {
        var param = "userid=" + $("#userid").val();
        window.location.href = "{:U('Pay/detail')}&" + param;
    }
</script>
</body>
</html>